package com.dsr.dao;

import com.dsr.entity.Collect;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;

import java.util.List;

/**
 * (Collect)表数据库访问层
 *
 * @author dsr
 * @since 2020-10-07
 */
public interface CollectDao extends MongoRepository<Collect, String> {

    Collect findByFlowerIdAndUserId(String flowerId,String userId);
    void  deleteByFlowerIdAndUserId(String flowerId,String userId);
    List<Collect> findByUserId(String userId);
    

//    @Query(value = "{userId: 1}",fields ="{}" )
//    List<String> selectByUserId(String userId);

}